Skip to main content

Overview

LANCommander supports the use of install scripts for handling anything after the download and extraction of a game by the launcher or SDK. Common uses for install scripts include importing registry keys, updating configs, and templating file structures. Like all client-side scripts with LANCommander, these are PowerShell scripts that are executed post-extraction using the built in runtime.

Here are some examples of some post-install automation you may want to consider:

  • Import/create registry keys necessary for game execution
  • Automatic detection of the primary display's resolution to update the game's graphics config
  • Scaffolding game files structures (profile directories required by the game)
  • Automatic installation of dependencies

Variables​

When an install script is executed, the following variables are available within the runtime:

NameTypeDescriptionApplicable To
$InstallDirectorystringThe install directory the game archive has been extracted toGames
$GameManifestLANCommander.SDK.GameManifestThe game manifest containing metadata about the gameGames
$BaseInstallDirectorystringThe base game's install directory. Differs from $InstallDirectory for addons installed to a sub directory or their own directory; same as $InstallDirectory for main gamesGames
$BaseGameManifestLANCommander.SDK.GameManifestThe base game's manifest; same as $GameManifest for main gamesGames
$DefaultInstallDirectorystringThe default install directory as specified in the clientGames
$ServerAddressstringThe source LANCommander server addressGames, Redistributables
$RedistributableLANCommander.SDK.Models.RedistributableThe redistributable's data objectRedistributables